﻿@model dynamic

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
    <head>
        <title>title</title>
    </head>
    <body>
        <input id="id1" />
        <input id="id2" />
    </body>
    <script src="~/bower_components/jquery/jquery.js"></script>
    <script>
        $(function () {
            function addListener(selector1, selector2) {
                $(selector1).bind('keyup keypress keydown', function () {
                    $(selector2).val($(this).val());
                });
            }
            addListener('#id1', '#id2');
            addListener('#id2', '#id1');
        });
    </script>
</html>